<?php

// This is a sample code in case you wish to check the username from a mysql db table
include('../config.php');
if($_GET['id'])
{
	$id=$_GET['id'];
	$total =(int) mysql_num_rows(mysql_query("SELECT * FROM product"));
	$sql = "delete from product where pID='".$id."'";
	$sql1 = "delete from comment where ID='".$id."'";
	mysql_query( $sql1) or die (mysql_error());
	mysql_query( $sql) or die (mysql_error());
	for ($i = $id; $i<$total;$i++) {
		$j = $i+1;
		mysql_query("UPDATE product SET pID='".$i."' WHERE pID='".$j."'") or die(mysql_error());
	}
}

?>